let _token: string = null
export const setToken = (token: string) => (_token = token)
export const getToken = (): string | null => {
  if (!_token) {
    const item = sessionStorage.getItem('_storage_state_userStore')
    try {
      const json = JSON.parse(item)
      _token = json?.token
    } catch {}
  }
  return _token
}
